import React, { useState } from 'react';
import { Button, Modal } from 'antd';
import { connect } from 'react-redux'

export const Delid = ({dispatch,props,openModel,closeMdel,delindex,delitem}:any) => {


  const handleOk = () => {
    closeMdel(false)
    dispatch({type:'second/DEL_ITEM',payload:delindex})
  };

  const handleCancel = () => {
    closeMdel(false)
  };

  return (
    <div>
        <Modal title="Basic Modal" open={openModel} onOk={handleOk} onCancel={handleCancel}>
        <p>你确定要输出<span style={{color:'#099'}}>{delitem}</span>么</p>
      </Modal>
    </div>
  )
}

const mapStateToProps = (state:any) => ({})



export default connect(mapStateToProps)(Delid)